import service from '@/utils/request'
// import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    // 新增招标补遗
    tenderChangeCreate (params) {
        return httpPost({
            url: '/tender/change/create',
            params
        })
    },
    // 根据ID删除招标补遗信息
    tenderChangeDelete (id) {
        return httpGet({
            url: `/tender/change/delete/${id}`,
            // params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 招标补遗分页查询
    tenderChangeListByEntity (params) {
        return httpPost({
            url: '/tender/change/listByEntity',
            params
        })
    },
    // 修改招标补遗基础信息
    tenderChangeUpdate (params) {
        return httpPost({
            url: '/tender/change/update',
            params
        })
    },
    //根据招标补遗ID查询
    tenderChangeFindById (id) {
        return httpGet({
            url: `/tender/change/findById/${id}`,
            // params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 招标公文分页
    documentListByEntity (params) {
        return httpPost({
            url: '/tender/apply/document/listByEntity',
            params
        })
    },
    // 新增清单批量(引入清单)
    inventoryCreateInventory (params) {
        return httpPost({
            url: '/tender/apply/inventory/createInventory',
            params
        })
    },
    // 更新清单
    inventoryUpdate (params) {
        return httpPost({
            url: '/tender/apply/inventory/update',
            params
        })
    },
    // 根据包件ID和父级ID查询清单
    inventoryListByPackageId (params) {
        return httpPost({
            url: '/tender/apply/inventory/listByPackageId',
            params
        })
    },
    // 根据招标类别和招标方式获取招标公告模板
    basePublicGetBasePublic (tenderClass, tenderForm) {
        return httpGet({
            url: `/tender/basePublic/getBasePublic?tenderClass=${tenderClass}&tenderForm=${tenderForm}`,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            },
        })
    },
    // 招标申请发布到四川路桥官网(公开招标) 其他招标发送邮件
    // tenderRelease (billId) {
    //     return httpGet({
    //         url: `/tender/apply/tenderRelease/${billId}`,
    //         headers: {
    //             'Content-Type': 'application/x-www-form-urlencoded'
    //         },
    //     })
    // },
    // 招标申请发布到四川路桥官网(公开招标) 其他招标发送邮件
    tenderRelease (params) {
        return httpGet({
            url: '/tender/apply/release',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 新增招标补遗澄清信息
    clarificationCreate (params) {
        return httpPost({
            url: '/tender/change/clarification/create',
            params
        })
    },
    // 根据招标补遗ID查询招标澄清信息
    clarificationFindById (billId) {
        return httpGet({
            url: `/tender/change/clarification/findById/${billId}`,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            },
        })
    },
    // 修改招标补遗澄清信息
    clarificationUpdate (params) {
        return httpPost({
            url: '/tender/change/clarification/update',
            params
        })
    },
    // 补遗：根据单据ID 获取包件信息
    packageGetByBillId (billId) {
        return httpGet({
            url: `/tender/change/package/getByBillId/${billId}`,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            },
        })
    },
    // 补遗：获取清单信息-懒加载
    getByPackageId (params) {
        return httpGet({
            url: '/tender/change/inventory/getByPackageId',
            params
        })
    },
    // 工程招标_清单
    crateLaborDtl (params) {
        return httpPost({
            url: '/tender/apply/crate/laborDtl',
            params
        })
    },
    // 根据包件ID和父级ID查询工程类清单(合同查询工程类清单使用)
    listByPackageId (params) {
        return httpPost({
            url: '/tender/apply/inventory/contract/listByPackageId',
            params
        })
    },
    // 加载所有清单
    allListByPackageId (params) {
        return httpGet({
            url: '/tender/apply/inventory/contract/listByPackageId',
            params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            },
        })
    },
    // 新增(修改)业绩信息
    achievementHistoryCreate (params) {
        return httpPost({
            url: '/tender/enroll/achievement/create',
            params
        })
    },
    // 根据招标报名单据ID查询所有业绩信息
    achievementHistoryList (billId) {
        return httpGet({
            url: `/tender/enroll/achievement/findByBillId/${billId}`,
            // params
        })
    },
    // 新增(修改)企业资质信息
    certificateCreate (params) {
        return httpPost({
            url: '/tender/enroll/certificate/create',
            params
        })
    },
    // 根据单据ID查询企业资质信息
    certificateListByEntity (billId) {
        return httpGet({
            url: `/tender/enroll/certificate/findByBillId/${billId}`,
            // params
        })
    },
    // 新增(修改)企业主要管理人员
    personCreate (params) {
        return httpPost({
            url: '/tender/enroll/person/create',
            params
        })
    },
    // 根据招标报名单据ID查询所有人员信息
    personFindByBillId (billId) {
        return httpGet({
            url: `/tender/enroll/person/findByBillId/${billId}`,
            // params
        })
    },
    // 招标附件信息新增
    attachmentCreate (params) {
        return httpPost({
            url: '/tender/attachment/create',
            params
        })
    },
    // 创建工程类招标报名
    erollCreate (params) {
        return httpPost({
            url: '/tender/enroll/create',
            params
        })
    },
    // 修改工程类招标报名
    erollUpdate (params) {
        return httpPost({
            url: '/tender/enroll/update ',
            params
        })
    },
    // 创建周材租赁类招标报名
    weeklyMaterialLeasingCreate (params) {
        return httpPost({
            url: '/tender/materialZhouCaiLeasing/eroll/create',
            params
        })
    },
    // 招标报名列表
    erollListEnrollByEntity (params) {
        return httpGet({
            url: `/tender/enroll/findByTenderApplyId/${params}`,
            // params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 根据ID查询报名基础信息
    erollGetById (id) {
        return httpGet({
            url: `/tender/enroll/findById/${id}`,
            // params,
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 新增报名包件
    packageCreate (params) {
        return httpPost({
            url: '/tender/enroll/package/create',
            params
        })
    },
    // 中标通知_通知内容_新增-修改
    noticeContentCreate (params) {
        return httpPost({
            url: '/tender/bidNotice/noticeContent/create',
            params
        })
    },
    // 补遗 清单,新增,修改,删除
    createInventory (params) {
        return httpPost({
            url: '/tender/change/inventory/createInventory',
            params
        })
    },
    // 补遗获取所有清单
    getAllListByPackageId (params) {
        return httpGet({
            url: '/tender/change/inventory/getAllListByPackageId',
            params
        })
    },
}

export default request
